# Maintainer: David Runge <dvzrv@archlinux.org>

pkgname=jackmeter
pkgver=0.4
pkgrel=3
pkgdesc="A basic console based DPM (Digital Peak Meter) for JACK"
arch=(loong64 x86_64)
url="https://www.aelius.com/njh/jackmeter"
license=(GPL2)
groups=(pro-audio)
depends=(glibc jack)
source=(https://github.com/njh/$pkgname/archive/$pkgver/$pkgname-$pkgver.tar.gz)
sha512sums=('29a80230eaada881ed96d8db3c176f4db75d68120ff95a5d3f20f02c3093315557532d4fd0995bbd80e133c68f27ac2920dce3a943e4f89d3fd3cbea87775dc4')
b2sums=('df25990f5fcbc54eb820dcf158e2e40dea665e762e64088ae33dd77c9a21559a4f7c596c27a7284fcac640de35ad414f1599ff7a36e7c203169e178edfdad491')

prepare() {
  cd $pkgname-$pkgver
  autoreconf -fiv
}

build() {
  cd $pkgname-$pkgver
  ./configure --prefix=/usr
  make
}

check() {
  make -k check -C $pkgname-$pkgver
}

package() {
  make DESTDIR="$pkgdir/" install -C $pkgname-$pkgver
  install -vDm 644 $pkgname-$pkgver/{AUTHORS,NEWS,README,TODO} -t "$pkgdir/usr/share/doc/$pkgname/"
}
